<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
	<%@ include file="/common/taglibs.jsp"%>
    <title>字典管理</title>
    <%@ include file="/common/meta.jsp"%>
</head>
<body>

	<!-- begin #page-loader -->
	<div id="page-loader" class="fade in"><span class="spinner"></span></div>
	<!-- end #page-loader -->
	
    <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
	
		<%@ include file="/common/header.jsp"%>
		<%@ include file="/common/slider.jsp"%>
		<div id="content" class="content">
		    <!-- BEGIN CONTENT HEADER-->
		    <ol class="breadcrumb pull-right">
				<li><a href="javascript:;"><fmt:message key="sys.healthcervix"/></a></li>
				<li><a href="javascript:;">系统设置</a></li>
				<li class="active">字典管理</li>
			</ol>
			<h1 class="page-header">
				字典管理 <!-- <small><fmt:message key="sys.healthcervix"/></small> -->
			</h1>
			
			<div class="row">
				<!-- begin col-12 -->
				<div class="col-md-12">
					<div class="panel panel-inverse">
						<div class="panel-heading">
							<form class="form-horizontal" id="searchForm" name="searchForm">
								<div class="">
									<div class="row">
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">名称</label>
											<div class="col-md-8 ui-sortable">
												<input id="name" class="form-control" placeholder="请输入要查询的字典名称" type="text" />
											</div>
										</div>
										
										<div class="col-md-3">
											<label class="col-md-3 control-label ui-sortable">类型</label>
											<div class="col-md-8 ui-sortable">
												<select id="type" name="type" class="form-control">
													<option value=""><fmt:message key="public.select.choose"></fmt:message></option>
													<c:forEach var="dict" items="${dictionarys}">
														<option value="${dict.key}">${dict.value}</option>
													</c:forEach>
												</select>
											</div>
										</div>
										<div class="col-md-3">
										</div>
										<div class="col-md-3">
											<shiro:hasPermission name="dictionary:list:search">
												<button id="searchBtn" name="searchBtn" class="btn btn-success btn-sm m-r-5 m-b-5" title="<fmt:message key='public.button_search'/>">
												<fmt:message key="public.button_search"/></button>
												<button id="clearBtn" name="clearBtn" class="btn btn-danger btn-sm m-r-5 m-b-5" title="<fmt:message key='public.button_clear'/>">
												<fmt:message key="public.button_clear"/></button>
											</shiro:hasPermission>
										</div>
									</div>
								</div>	
							</form>
						</div>
			
						<div class="panel-body">
							<shiro:hasPermission name="dictionary:list:add">
		                        <p>
		                        	<a id="addBtn" name="addBtn" href="javascript:;" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i>新增</a>
								</p>
							</shiro:hasPermission>
							<table id="dictionaryTables" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th style="width:5%"><fmt:message key="public.list.index"/></th>
										<th style="width:25%">名称</th>
										<!-- <th>编码</th> -->
										<th style="width:20%">类型</th>
										<th style="width:30%">描述</th>
										<th style="width:20%"><fmt:message key="public.list.operation"/></th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
					<!-- end panel -->
				</div>
				<!-- end col-12 -->
			</div>
			
			<div class="modal fade" id="actionDlg" name="actionDlg">
				<div class="modal-dialog">
					<form id="editForm" name="editForm" action="#" class="form-horizontal">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
								<h4 class="modal-title"><span id="headTitle"></span></h4>
							</div>
							<div class="modal-body">
									<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable"><span class="required">*</span>名称</label>
				                        <div class="col-md-9 ui-sortable">
				                            <input type="hidden" name="id" id="id"/>
											<input type="text" name="name"  class="form-control"    style="width: 80%"/>
				                        </div>
			                    	</div>
			                    	<div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable"><span class="required">*</span>类型</label>
				                        <div class="col-md-9 ui-sortable">
											<select id="type" name="type" class="form-control" style="width: 80%;">
												<option value=""><fmt:message key="public.select.choose"></fmt:message></option>
												<c:forEach var="dict" items="${dictionarys}">
													<option value="${dict.key}">${dict.value}</option>
												</c:forEach>
											</select>
				                        </div>
			                    	</div>
				                    <div class="form-group">
				                        <label class="col-md-3 control-label ui-sortable">描述</label>
				                        <div class="col-md-9 ui-sortable">
				                        	<textarea rows="5" cols="6" name="description" class="form-control" style="width: 80%"></textarea>
				                        </div>
				                    </div>
							</div>
							<div class="modal-footer-dialog">
								<a href="javascript:;" class="btn btn-sm btn-default" data-dismiss="modal"><fmt:message key="public.button_close"/></a>
								<button type="button" class="btn btn-sm btn-primary" id="editFormBtn"><fmt:message key="public.button_save"/></button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- END PAGE -->  
		  
	</div>
	
	<%@ include file="/common/footer.jsp" %>
	<script src="${ctx}/assets/js/jquery.dataTables.js"></script>
	<script src="${ctx}/assets/js/DT_bootstrap.js"></script>
	<script type="text/javascript" src="${ctx}/js/dictionary/list.js?v=${ver}"></script> 
	<script type="text/javascript">
		jQuery(document).ready(function() {       
			SysDictManaged.init();
		});
	</script>
</body>
<!-- END BODY -->
</html>